﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ilanver.Core;
using ilanver.Data.NHibernate.Abstraction;

namespace ilanver.Data.NHibernate.Statics
{
    public static class SessionFactoryKeyHelper
    {
        public static string GetKey()
        {
            var provider = SafeServiceLocator<ISessionFactoryKeyProvider>.GetService();
            return provider.GetKey();
        }

        public static string GetKey(object anObject)
        {
            var provider = SafeServiceLocator<ISessionFactoryKeyProvider>.GetService();
            return provider.GetKeyFrom(anObject);
        }
    }
}
